<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% String status = request.getParameter("status"); %>

<html>
<head>
	<title>Registration</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="css/LT.css">
	<script type="text/javascript" src="js/LT.js" ></script>
	<script type="text/javascript" src="js/register.js" ></script>
</head>
<body>
	<center>
		<jsp:include page="header.jsp"> 
			<jsp:param name="user" value="" />
		</jsp:include>
		
		<div style="font-family: tahoma,arial,verdana,sans-serif,Lucida Sans; font-size: 11px; border:1px solid #CCCCCC; width:800px; height:655px;">
	
		
			<div style="border-bottom:1px solid #cccccc; padding:10px; text-align:center; background:#F6F6F6; background:#8EB934; color:white;">
				<b>Registration</b> 
			</div>
			
			<%  Object user = request.getSession().getAttribute("user");
				if(user == null) {
		
				 if(status == null || status.trim().equals("")) { %>
				
				<!-- REGISTRATION FORM -->
				<div style="overflow:auto; width:800px; height:600px; text-align:left; padding-left:200px;">
					<div style="padding-left:100px; padding-bottom:20px; padding-top:20px;"><b>Registration on LimeTalks.com</b></div>
					<form action="Register" method="POST" onsubmit="return validateRegForm()">
						E-mail:<font color="red">*</font><input type="text" id="email" name="email" style="margin-left:80px;"><br>
						Login:<font color="red">*</font> <input type="text" id="login" name="login" style="margin-left:80px;"><br>
						Password:<font color="red">*</font> <input id="pass1" type="password" name="password" style="margin-left:59px;"><br>
						Confirm Password:<font color="red">*</font> <input id="pass2" type="password" style="margin-left:19px;"><br>
						<div style="color:grey; padding-top:10px; padding-left:10px;">I have read, understood and agree to LimeTalks.com site <a href="" style="color:grey;">rules</a>.</div>
						<input type="submit" value="Register" style="margin-top:15px; margin-left:110px; padding-left:10px; padding-right:10px;">
					</form>
				</div>	
			
				
				<% } else if(status.equals("success")) { %>
				
				<div style="overflow:auto; width:800px; height:600px; text-align:left; padding-left:200px;">
					<div style="padding-left:70px; padding-bottom:20px;"><b>Registration successful !</b></div>
					<div style="padding-left:30px; ">An email was sent to you. Check your email.</div>
				</div>
				
				<% } else if(status.equals("error")) { %>
				
				<div style="overflow:auto; width:800px; height:600px; text-align:left; padding-left:200px;">
					<div style="padding-left:70px; padding-bottom:20px;"><b>This email is already registered.</b></div>
				</div>
				
				<% } else if(status.equals("confirm")) { %>
				
				<div style="overflow:auto; width:800px; height:600px; text-align:left; padding-left:200px;">
					<div style="padding-left:70px; padding-bottom:20px;"><b>Registration confirmed !</b></div>
					<div style="padding-left:30px; ">Now you can create your own speeches.</div>
				</div>
				
				<% } %>
				
			<% } else { %>
			
				<div style="margin-top:20px;">You are already authorized as <%= user.toString() %>. Please log out to register new account.</div>
			
			<% } %>
		
		</div>
			
		<jsp:include page="footer.jsp" /> 	
		
	</center>

</body>
</html>